/**
 * FtpContentServiceImpl.java
 */
package org.yate.oa.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.yate.oa.dao.IBaseMapperDao;
import org.yate.oa.dao.mapper.TransformerMapper;
import org.yate.oa.model.Transformer;
import org.yate.oa.service.TransformerService;
import org.yate.oa.utils.Pagination;

/**
 * @author Yate
 * @date Jul 19, 2014
 * @description TODO
 * @version 1.0
 */
@Service
public class TransformerServiceImpl extends BaseService<Transformer, Long>
		implements TransformerService {

	@Resource
	private TransformerMapper mapper;

	@Override
	public Pagination<Transformer> getTransformers(int idx, int rows, int type) {
		Pagination<Transformer> p = new Pagination<Transformer>(idx, rows);
		Transformer e = new Transformer();
		e.setType(type);
		List<Transformer> l = mapper.getEntities(p, e);
		p.setRows(l);
		return p;
	}

	protected IBaseMapperDao<Transformer, Long> getMapperDao() {
		return mapper;
	}

}
